package cn.hnc.checkapi.repository;

import cn.hnc.checkapi.bean.Servo;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface ServoRepository extends JpaRepository<Servo, Long> {
   List findByProductId(Long productId);

   @Query(
      value = " select * from servo ",
      nativeQuery = true
   )
   List getAll();

   List findByServoId(String servoId);

   void deleteByProductId(Long productId);

   Servo findByProductIdAndAxisName(Long productId, String axisName);
}
